{php include wl_template('common/header');}
<link rel="stylesheet" href="{TG_URL_ARES}components/light/light7.min.css">
<link rel="stylesheet" href="{TG_URL_ARES}components/weui/weui.css">
<link rel="stylesheet" href="{TG_URL_ARES}xiangxiu/css/common.css"/>
<script type='text/javascript' src='{TG_URL_ARES}components/light/light7.min.js' charset='utf-8'></script>
<script type="text/javascript" src="{MODULE_URL}app/resource/layer/layer.js" ></script>
<script type='text/javascript' src='{TG_URL_ARES}js/laytpl.js' charset='utf-8'></script>
<div class="page-group">
    <div class="page page-current" id="page-order-check">
        <div class="content infinite-scroll" >
            {if $is_hexiao_member}
            {if $result=='success'}
            <div class="msg">
                <div class="weui_msg">
                    <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
                    <div class="weui_text_area">
                        <h2 class="weui_msg_title">核销成功</h2>
                        <p class="weui_msg_desc">点击确定，可返回微信</p>
                    </div>
                    <div class="weui_opr_area">
                        <p class="weui_btn_area">
                            <a id="closewindow" class="weui_btn weui_btn_primary">确定</a>
                        </p>
                    </div>
                </div>
            </div>
            {else}
            <div class="list-block cards-list" style="margin: 0;">
                <ul>
                    <li class="card" style="border-radius: .2rem;">
                        <div class="card-header"><h3 class="font-size-14">核销凭证</h3></div>
                        <div class="card-content">
                            <div class="card-content-inner">

                                <div class="voucher-address font-size-14" style="margin-top:-10px;">
                                    <p>订单号：{$checkorder['orderno']}</p>
                                </div>

                                <div class="voucher-goods-info font-size-14">

                                    <p>商品名称：{$checkorder['goodsname']} </p>

                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="weui_btn_area">
                <a id="conbdel"  class="weui_btn weui_btn_primary">确认{if $order['selltype']==7}收款{/if}核销</a>
                <a id="closewindow" class="weui_btn weui_btn_default">返回微信</a>
            </div>
            {/if}
            {else}
            <div class="msg">
                <div class="weui_msg">
                    <div class="weui_icon_area"><i class="weui_icon_msg weui_icon_warn"></i></div>
                    <div class="weui_text_area">
                        <h2 class="weui_msg_title">非核销人员</h2>
                        <p class="weui_msg_desc">点击确定，可返回微信</p>
                    </div>
                    <div class="weui_opr_area">
                        <p class="weui_btn_area">
                            <a id="closewindow" class="weui_btn weui_btn_primary">确定</a>
                        </p>
                    </div>
                </div>
            </div>
            {/if}
        </div>
    </div>
</div>
<script>
    $(document).on('click','#conbdel',function(){

        $.confirm('此操作不可恢复，确认核销？',
                function () {

                    $.post("{php echo app_url('order/check',array('mid' => $orderno))}",function(d){

                        if(d.status == 1){
                            location.href = "{php echo app_url('order/check',array('mid' => $orderno,'result' => 'success'))}";
                        }else{
                            $.toast(d.result);
                        }
                    },"json");
                }
        );
    });

    wx.ready(function(){
        $('#closewindow').click(function(){
            wx.closeWindow();
        });
    });
</script>
<!--{php include wl_template('common/footer');}-->